package com.ruoyi.kiku.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kiku.mapper.KikuOrangeRelationshipMapper;
import com.ruoyi.kiku.domain.KikuOrangeRelationship;
import com.ruoyi.kiku.service.IKikuOrangeRelationshipService;

/**
 * 橘子关系管理Service业务层处理
 *
 * @author TT
 * @date 2025-07-31
 */
@Service
public class KikuOrangeRelationshipServiceImpl implements IKikuOrangeRelationshipService
{
    @Autowired
    private KikuOrangeRelationshipMapper kikuOrangeRelationshipMapper;

    /**
     * 查询橘子关系管理
     *
     * @param id 橘子关系管理主键
     * @return 橘子关系管理
     */
    @Override
    public KikuOrangeRelationship selectKikuOrangeRelationshipById(Long id)
    {
        return kikuOrangeRelationshipMapper.selectKikuOrangeRelationshipById(id);
    }

    /**
     * 查询橘子关系管理列表
     *
     * @param kikuOrangeRelationship 橘子关系管理
     * @return 橘子关系管理
     */
    @Override
    public List<KikuOrangeRelationship> selectKikuOrangeRelationshipList(KikuOrangeRelationship kikuOrangeRelationship)
    {
        return kikuOrangeRelationshipMapper.selectKikuOrangeRelationshipList(kikuOrangeRelationship);
    }

    /**
     * 新增橘子关系管理
     *
     * @param kikuOrangeRelationship 橘子关系管理
     * @return 结果
     */
    @Override
    public int insertKikuOrangeRelationship(KikuOrangeRelationship kikuOrangeRelationship)
    {
        kikuOrangeRelationship.setCreateTime(DateUtils.getNowDate());
        return kikuOrangeRelationshipMapper.insertKikuOrangeRelationship(kikuOrangeRelationship);
    }

    /**
     * 修改橘子关系管理
     *
     * @param kikuOrangeRelationship 橘子关系管理
     * @return 结果
     */
    @Override
    public int updateKikuOrangeRelationship(KikuOrangeRelationship kikuOrangeRelationship)
    {
        kikuOrangeRelationship.setUpdateTime(DateUtils.getNowDate());
        return kikuOrangeRelationshipMapper.updateKikuOrangeRelationship(kikuOrangeRelationship);
    }

    /**
     * 批量删除橘子关系管理
     *
     * @param ids 需要删除的橘子关系管理主键
     * @return 结果
     */
    @Override
    public int deleteKikuOrangeRelationshipByIds(Long[] ids)
    {
        return kikuOrangeRelationshipMapper.deleteKikuOrangeRelationshipByIds(ids);
    }

    /**
     * 删除橘子关系管理信息
     *
     * @param id 橘子关系管理主键
     * @return 结果
     */
    @Override
    public int deleteKikuOrangeRelationshipById(Long id)
    {
        return kikuOrangeRelationshipMapper.deleteKikuOrangeRelationshipById(id);
    }
}
